Skip to main content

Retrieve Trade Trackings

GET /api/v1/trade-trackings

Description

Retrieves a list of trade tracking entries, allowing for detailed analysis based on search terms, date ranges, status, and other filtering criteria. This endpoint supports extensive filtering and sorting to provide tailored insights into the logistics and status of trades.

Headers:

  • tenantId (required): The tenant ID under which the trade trackings are registered. This identifies the specific tenant environment.
  • userId (required): The user ID of the individual requesting the trade tracking information. Used for authentication and authorization.
  • countryCode (required): The country code indicating where the trade operations are based or registered.

Query Parameters:

  • tradeTrackingSearch (optional): A general search term to filter the trade trackings.
  • tradeTrackingDateRange (optional): Filters the trade trackings by a specific date range. Format: start_date,end_date (e.g., 2020-11-12,2022-11-15).
  • trackingStatuses (optional): Filters the trackings by their current statuses. Available values: SELLER_WAREHOUSE, IN_TRANSIT, DELIVERED.
  • trackingsByTradeIds (optional): Filters the trackings by specific trade IDs.
  • trackingIds (optional): Filters the trackings by specific tracking IDs.
  • order (optional): Specifies the order of the results. Available values: ASC, DESC.
  • page (optional): Specifies the pagination page.
  • limit (optional): Specifies the number of results per page.

Example Request:

curl -G "http://[base_url]/api/v1/trade-trackings" \
-H "Authorization: Bearer [access_token]" \
-H "tenantId: TEN123" \
-H "userId: USR456" \
-H "countryCode: US" \
-d "tradeTrackingSearch=shipment" \
-d "tradeTrackingDateRange=2020-11-12,2022-11-15" \
-d "trackingStatuses=IN_TRANSIT" \
-d "trackingsByTradeIds=12345,67890" \
-d "trackingIds=98765" \
-d "order=ASC" \
-d "page=1" \
-d "limit=10"

Responses:

  • 200 OK: Successfully retrieved the list of trade tracking entries. The response includes detailed information about each tracking entry that matches the filter criteria.

Example Response:

{
"trackings": [
{
"trackingId": "98765",
"tradeId": "12345",
"status": "IN_TRANSIT",
"origin": "New York, USA",
"destination": "London, UK",
"shippingDate": "2023-01-15",
"expectedDeliveryDate": "2023-01-22"
}
],
"totalItems": 20,
"totalPages": 2,
"currentPage": 1
}

Error Responses:

  • 400 Bad Request: Incorrect or incomplete query parameters.
  • 404 Not Found: No trackings found based on the provided criteria.
  • 403 Forbidden: The user does not have permission to view the trade trackings.

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request GET \ 
--url /api/v1/trade-trackings \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!